fix: The project root is ambiguous in tsconfig.json#2127
Conversation
Greptile SummaryThis PR resolves the
Confidence Score: 5/5Safe to merge — changes are scoped entirely to TypeScript configuration and test tooling with no runtime impact. The root fix (adding rootDir to tsconfig.build.json and moving outDir out of the base config) is correct and targeted. Switching the build to module/moduleResolution nodenext is intentional and appropriate for the ESM package. No logic, runtime, or API surface is changed. No files require special attention.
|
| Filename | Overview |
|---|---|
| tsconfig.build.json | Core fix: adds explicit rootDir, outDir, module/moduleResolution (nodenext), and tsBuildInfoFile; switches to include-based filtering — cleanly resolves the project root is ambiguous error. |
| tsconfig.json | Removes outDir (now only in tsconfig.build.json), adds mocks/**/*.ts to includes; minor style inconsistency (missing leading ./ on the mocks glob) but functionally correct. |
| vitest.config.ts | Coverage thresholds raised across all four metrics — straightforward update reflecting improved test coverage. |
| playgrounds/package-lock.json | Lock file updated to reflect a version bump from 5.6.8 to 5.7.0 for the parent package — no concerns. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[npm run build] --> B[compile:lib - tsc --build tsconfig.build.json]
A --> C[test:tsc - tsc --project tsconfig.json --noEmit]
B --> D[tsconfig.build.json]
D --> E[rootDir: ./src, outDir: ./lib/, module: nodenext]
E --> G[lib/ output]
C --> H[tsconfig.json - moduleResolution: bundler, no outDir]
H --> I[src + mocks + test included]
I --> J[type-check only, no emit]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[npm run build] --> B[compile:lib - tsc --build tsconfig.build.json]
A --> C[test:tsc - tsc --project tsconfig.json --noEmit]
B --> D[tsconfig.build.json]
D --> E[rootDir: ./src, outDir: ./lib/, module: nodenext]
E --> G[lib/ output]
C --> H[tsconfig.json - moduleResolution: bundler, no outDir]
H --> I[src + mocks + test included]
I --> J[type-check only, no emit]
Reviews (4): Last reviewed commit: "Rerun playgrounds + increase coverage" | Re-trigger Greptile
The project root is ambiguous, but is required to resolve export map entry '.' in file '/Users/dprevost/Git/expect-webdriverio/package.json'. Supply the `rootDir` compiler option to disambiguate.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
710d4d5 to
d53cce8
Compare
Fixing the below error that sometimes also fails when executing
npm checks:all__mock__folder.